package com.xxkj.drugtraceability.ui.hascollected

import com.xxkj.drugtraceability.base.BaseRepository
import com.xxkj.drugtraceability.bean.*
import com.xxkj.drugtraceability.net.Result
import com.xxkj.drugtraceability.net.WanService

/**
 * author: zhoujingjin
 * created on: 2024/9/18 15:54
 * description:
 */
class HasCollectedRepository(private val wanService: WanService):BaseRepository() {
    suspend fun queryInStorageInfo(data:String): Result<BaseData<OneData>> {
        return safeApiCall { executeResponse(wanService.queryInStorageInfo(data)) }
    }
    suspend fun getDrugOutDepotList( data:String):Result<BaseData<OneOutData>>{
        return safeApiCall { executeResponse(wanService.getHasDrugOutDepotList(data)) }
    }
    suspend fun tracCodeList(collectEndTime:String,
                             collectStartTim:String,
                             dataType:String,
                             patientId:String,
                             pdaSearchKeyWord:String,
                             psnName:String,
                             tradeType:String,
                             visitNo:String
    ): Result<TwoData> {
        return safeApiCall { executeResponse(wanService.tracCodeList(collectEndTime,collectStartTim,dataType,patientId,pdaSearchKeyWord,psnName,tradeType,visitNo)) }
    }
}